﻿#ifndef RULEREADER_H
#define RULEREADER_H

#include "filereader.h"
#include <QJsonArray>
#include <QJsonDocument>
#include <QJsonObject>
#include <QJsonParseError>
#include <QJsonValue>


class RuleReader : public FileReader
{
    Q_OBJECT
public:
    explicit RuleReader(QString str, QObject *parent = nullptr);


    // FileReader interface
public:
    bool readFile() override;
    // QList<QPair<int, QString>> getRuleList(QString iCaseName);
    QString getRuleStringFromColumnObject(QJsonObject columnObject);
    QStringList getRuleVariantListFromColumnObject(QJsonObject columnObject);
    QJsonObject getColumnObjects(QString iCaseName);
    QStringList getCaseList();
    QHash<QString, QJsonObject> getLogFileters(QString iCaseName);


private:
    QJsonObject rootObject;

};

#endif // RULEREADER_H
